Here is a cool little project on mapping oil spills in California
Hello guys!
It’s been a while since I’ve last posted here, right?
This time I’ll show you some new mapping skills I learned recently thanks to Allison Horst and Casey O’Hara!
I got data on the records of California oil spills by county in 2008 from this website https://gis.data.ca.gov/datasets/7464e3d6f4924b50ad06e5a553d71086_0/data and created a few data visualizations to show exactly where oil spills occurred in an interactive map. I also created a choropleth map based on the counts of oil spills per county so we can see where they most occurred in 2008.
Here are the plots!
## Read in the data
### Oil spills by county
ca_oil_spills <- read_sf(here("data", "oil_spills", "Oil_Spill_Incident_Tracking_%5Bds394%5D.shp")) %>%
clean_names() %>%
rename(object_id = objectid,
dfg_control = dfgcontrol,
oes_number = oesnumber,
date = dateofinci,
inland_marine = inlandmari,
time = timeofinci,
location = specificlo,
city = localecity,
county_name = localecoun)
### California counties shape file
ca_counties <- read_sf(here("data", "ca_counties", "CA_Counties_TIGER2016.shp")) %>%
clean_names() %>%
dplyr::select(name) %>%
rename(county_name = name)